//
//  UINavigationBar+Additions.m
//  NewApp
//
//  Created by  on 12-6-15.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "UINavigationBar+Additions.h"

@implementation UINavigationBar (Additions)

- (void) setBkImage:(UIImage *)bkImage {
    if ([self respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]) {
        [self setBackgroundImage:bkImage forBarMetrics:UIBarMetricsDefault];
    }else {
        UIImageView* imageView = [[[UIImageView alloc] initWithFrame:CGRectMake(0.f, 0.f, 320.f, 44.f)] autorelease];
        imageView.contentMode = UIViewContentModeLeft;
        imageView.image = [UIImage imageNamed:@"top_logo.png"];
        [self insertSubview:imageView atIndex:0];
    }
}

@end
